<!DOCTYPE html>
<html>
<!-- Mirrored from www.zi-han.net/theme/hplus/empty_page.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:52 GMT -->

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>公告管理</title>
    <meta name="keywords" content="第八站,商品分类,后台HTML,响应式后台">
    <meta name="description" content="第八站管理后台">
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="libs/layui/css/layui.css">
    <link href="css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="libs/page/pager.css">
    <link rel="stylesheet" href="css/common.css">
    <style type="text/css">
    td {
        /*line-height: 10px!important;*/
    }
    </style>
</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>公告管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="index-2.html">主页</a>
                </li>
                <li>
                    <span>系统设置</span>
                </li>
                <li>
                    <strong>公告管理</strong>
                </li>
            </ol>
        </div>
        <div class="col-sm-8">
            <div class="title-action">
                <!-- <a href="empty_page.html" class="btn btn-primary">活动区域</a> -->
            </div>
        </div>
    </div>
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content container-fiuled">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class=" pull-left" style="width: 100%;">
                        
                                    <form class="form-horizontal" role="form">
                                        <div class="panel panel-default">
                                            <div class="panel-heading">
                                                <span class="panel-title">
                                                    筛选查询
                                                </span>
                                               
                                            </div>
                                           <div class="panel-body">
                                                <div class="row" style="padding: 0 10px">
                                                  <label class="control-label">模糊检索：</label>
                                                    <input class="form-control select-input" placeholder="公告内容/发布人" type="text" name="">
                                                    <span class="select-date">
                                                        <span>发布时间：</span>
                                                        <input id="dateStar" class="laydate-icon"> -
                                                        <input id="dateEnd" class="laydate-icon">
                                                    </span>
                                                    <button type="button" class="btn btn-primary pull-right select-btn">查询</button>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <button onclick="showModal()" class="btn btn-primary add-article">发布公告</button>
                                <table class="table table-bordered table-hover table-center">
                                    <thead>
                                        <tr>
                                            <th width="40px" class="text-center">
                                                <input id="head-selectAll" class="selectAll" type="checkbox" name="selectAll">
                                            </th>
                                            <th width="200px">排序</th>
                                            <th>公告内容</th>
                                            <th>发布时间</th>
                                            <th>有效时间</th>
                                            <th>发布人员</th>
                                            <th>是否显示</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input type="checkbox" class="chooseFruit" value="1">
                                            </td>
                                            <td>5</td>
                                            <td>向每一位努力的劳动者致敬</td>
                                            <td>2018年5月28日 14:00:16</td>
                                            <td>2018年6月28日 14:00:25</td>
                                            <td>admin</td>
                                            <td>
                                                <form class="layui-form layui-form-pane1" action="" lay-filter="first">
                                                    <input type="checkbox" name="zzz" lay-skin="switch" lay-text="正常|异常">
                                                </form>
                                            </td>
                                            <td>
                                                <button type="button" class="btn btn-xs btn-success" onclick="showModal()">编辑</button>
                                                <button type="button" class="btn btn-xs btn-danger">删除</button>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input type="checkbox" class="chooseFruit" value="1">
                                            </td>
                                            <td>5</td>
                                            <td>向每一位努力的劳动者致敬</td>
                                            <td>2018年5月28日 14:00:16</td>
                                            <td>2018年6月28日 14:00:25</td>
                                            <td>admin</td>
                                            <td>
                                                <form class="layui-form layui-form-pane1" action="" lay-filter="first">
                                                    <input type="checkbox" name="zzz" lay-skin="switch" lay-text="正常|异常">
                                                </form>
                                            </td>
                                            <td>
                                               <button type="button" class="btn btn-xs btn-success" onclick="showModal()">编辑</button>
                                                <button type="button" class="btn btn-xs btn-danger">删除</button>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input type="checkbox" class="chooseFruit" value="1">
                                            </td>
                                            <td>5</td>
                                            <td>向每一位努力的劳动者致敬</td>
                                            <td>2018年5月28日 14:00:16</td>
                                            <td>2018年6月28日 14:00:25</td>
                                            <td>admin</td>
                                            <td>
                                                <form class="layui-form layui-form-pane1" action="" lay-filter="first">
                                                    <input type="checkbox" name="zzz" lay-skin="switch" lay-text="正常|异常">
                                                </form>
                                            </td>
                                            <td>
                                                <button type="button" class="btn btn-xs btn-success" onclick="showModal()">编辑</button>
                                                <button type="button" class="btn btn-xs btn-danger">删除</button>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input type="checkbox" class="chooseFruit" value="1">
                                            </td>
                                            <td>5</td>
                                            <td>向每一位努力的劳动者致敬</td>
                                            <td>2018年5月28日 14:00:16</td>
                                            <td>2018年6月28日 14:00:25</td>
                                            <td>admin</td>
                                            <td>
                                                <form class="layui-form layui-form-pane1" action="" lay-filter="first">
                                                    <input type="checkbox" name="zzz" lay-skin="switch" lay-text="正常|异常">
                                                </form>
                                            </td>
                                            <td>
                                                <button type="button" class="btn btn-xs btn-success" onclick="showModal()">编辑</button>
                                                <button type="button" class="btn btn-xs btn-danger">删除</button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div>
                                    <input type="checkbox" id="foot-selectAll" class="margin-l-20" style="margin-left: 16px">全选
                                    <button type="button" class="btn btn-primary margin-r-20" onclick="getCheckData()">批量删除</button>
                                    <dl class=" pull-right">
                                        <ul class="pagination" id="page1"></ul>
                                    </dl>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 新增消息弹框 -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">发布公告</h4>
                </div>
                <form class="form-horizontal" role="form">
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label collection-label"><em class="red-color">*</em> 开始时间</label>
                            <div class="col-sm-9">
                                <input type="text" placeholder="请输入手机号码" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label collection-label"><em class="red-color">*</em> 到期时间</label>
                            <div class="col-sm-9">
                                <input type="text" placeholder="请输入标题" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label collection-label"><em class="red-color">*</em>是否显示</label>
                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input type="radio" name="optionsRadiosinline" value="1" checked>显示
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="optionsRadiosinline" value="0">不显示
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label collection-label"><em class="red-color">*</em> 排序</label>
                            <div class="col-sm-9">
                                <input type="text" placeholder="请输入标题" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label collection-label"><em class="red-color">*</em> 内容</label>
                            <div class="col-sm-9">
                                <textarea type="text/plain" style="width:100%;height:100px;"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary">添加</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/content2.min.js?v=1.0.0"></script> -->
    <script src="js/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <script type="text/javascript" src="libs/page/pager.js"></script>
    <script src="js/plugins/layer/laydate/laydate.js"></script>
    <script src="libs/layui/layui.js"></script>
    <script type="text/javascript">
    $('.deleteBtn').click(function() {
        swal({
            title: "您确定要删除这条数据吗",
            text: "删除后将无法恢复，请谨慎操作！",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "删除",
            closeOnConfirm: false
        }, function() {
            // do someting
            swal("删除成功！", "您已经永久删除了这条数据。", "success");
        });
    });
    $(function() {
        Page({
            num: 20, //页码数
            startnum: 0, //指定页码
            elem: $('#page1'), //指定的元素
            callback: function(n) { //回调函数
                console.log(n);
            }
        });
    })

    function showModal() {
        $('#myModal').modal('show');
    }

    // 全选、反选

    $("#head-selectAll").click(function() {
        setCheckBox(!$(this).is(':checked'));
        $("#foot-selectAll").prop("checked", $(this).is(':checked'))
    });
    $("#foot-selectAll").click(function() {
        setCheckBox(!$(this).is(':checked'));
        $("#head-selectAll").prop("checked", $(this).is(':checked'))
    });

    function setCheckBox(state) {
        if (state) {
            $('.chooseFruit').each(function() {
                $(this).prop("checked", false);
            });
        } else {
            $('.chooseFruit').each(function() {
                $(this).prop("checked", true);
            });
        }
    }
    $(".chooseFruit").click(function() {
        $('.chooseFruit').each(function(i) {
            if (!$(this).is(':checked')) {
                $("#head-selectAll").prop("checked", false);
                $("#foot-selectAll").prop("checked", false);
                return false
            }
            if (i + 1 == $('.chooseFruit').length) {
                $("#head-selectAll").prop("checked", true);
                $("#foot-selectAll").prop("checked", true);
            }
        });

    });

    function getCheckData() {
        var arr = new Array();
        $('.chooseFruit:checked').each(function(i) {
            arr[i] = parseInt($(this).val());
        });
        console.log(arr);
    }
    </script>
    <script type="text/javascript">
    laydate({ elem: "#dateStar", event: "focus" });
    laydate({ elem: "#dateEnd", event: "focus" });
    layui.use('form', function() {
        var form = layui.form;
        form.on('switch', function(data) {
            console.log(data);
        });
    });
    </script>
</body>
<!-- Mirrored from www.zi-han.net/theme/hplus/empty_page.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:52 GMT -->

</html>